package com.baizhi.controller;

import com.baizhi.entity.Option;
import com.baizhi.service.OptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class OptionController {
    @Autowired
    private OptionService os;
    @GetMapping("options/{id}")
    public List<Option> selectOption(@PathVariable("id")int id){
        List<Option> options = os.selectOption(id);
        return options;
    }
    @GetMapping("Options/{id}")
    public List<Option> selectNum(@PathVariable("id") int id){
       return os.selectGroup(id);
    }
}
